package com.chenwut.stringBuilderDemo;

public class StringBuilderDemo2 {
    public static void main(String[] args) {
        //1.创建对象
        StringBuilder sb = new StringBuilder();

        //2.添加
        sb.append("aaa");
        sb.append("bbb");
        sb.append("ccc");

        System.out.println(sb);

        //3.把StringBuilder变成字符串
        String str = sb.toString();
        System.out.println(str);
    }
}
